from src.Service.PetQAService import PetQAService
from src.Service.ProductService import ProductService
from src.Service.RecommendationService import RecommendationService

pet_qa_service = PetQAService()
product_service = ProductService()
recommendation_service = RecommendationService()

class AppController:
    def __init__(self):
        self.pet_qa_service = pet_qa_service
        self.product_service = product_service
        self.recommendation_service = recommendation_service

    async def answer_question(self, question: str):
        print(f"answer_question ============================ {question}")
        """处理用户问题"""
        return await self.pet_qa_service.answer(question)

    def find_similar(self, query: str):
        """查找相似商品"""
        return self.product_service.find_similar(query)
